<?php
//简单管理页面范例，在你的管理页面引用coresection/checkA.php就OK，当然，不要忘了添加注销登录的链接
include_once '../coresection/checkA.php';
?>

<? $system_part=$_REQUEST ['sys_part']; ?>

<?
include_once("../../config_controller.php");
$host = $_SERVER['HTTP_HOST']; //取得进入所输入的域名
$theme_folder = host_theme($host);

include_once '../../front/'.$theme_folder.'/connection.php';include_once '../coresection/check_session.php';;
?>

<?php include_once("function.php"); ?>
<?php include "../../front/".$theme_folder."/config.php"; ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include_once('modules/head.php'); ?>
</head>

<body style="display:none">


<?php
$trans_nid = $_REQUEST ['nid'];
$image = $_REQUEST ['img'];
?>

 
<?
//设置需要搜索的表格的前缀后缀
$table_Suffix=$sys_list_table;
$table=$table_Prefix.$table_Suffix;
//设置需要搜索的表格的前缀后缀


//设置需要搜索的表格的排序项和升降项
$sort_by = "nid";
$sort_order = "desc";
//设置需要搜索的表格的排序项和升降项
?>

<?  


$target_img="alpha.gif";

if($image=="icon")
{
$sql = "update $table SET icon = '$target_img' where nid= $trans_nid";
}


else if($image=="banner")
{
$sql = "update $table SET banner = '$target_img' where nid= $trans_nid";
}


else if($image=="image1")
{
$sql = "update $table SET image1 = '$target_img' where nid= $trans_nid";
}

else if($image=="image2")
{
$sql = "update $table SET image2 = '$target_img' where nid= $trans_nid";
}


else if($image=="image3")
{
$sql = "update $table SET image3 = '$target_img' where nid= $trans_nid";
}


else if($image=="image4")
{
$sql = "update $table SET image4 = '$target_img' where nid= $trans_nid";
}


else if($image=="image5")
{
$sql = "update $table SET image5 = '$target_img' where nid= $trans_nid";
}
else if($image=="image6")
{
$sql = "update $table SET image6 = '$target_img' where nid= $trans_nid";
}
else if($image=="image7")
{
$sql = "update $table SET image7 = '$target_img' where nid= $trans_nid";
}
else if($image=="image8")
{
$sql = "update $table SET image8 = '$target_img' where nid= $trans_nid";
}
else if($image=="image9")
{
$sql = "update $table SET image9 = '$target_img' where nid= $trans_nid";
}
else if($image=="image10")
{
$sql = "update $table SET image10 = '$target_img' where nid= $trans_nid";
}

else if($image=="extend_img")
{
    $sql = "update $table SET extend_img = '$target_img' where nid= $trans_nid";
}

else if($image=="attachment")
{
$sql = "update $table SET attachment = '/' where nid= $trans_nid";
}
 
	sql_log($sql);
	$query= mysql_query($sql) or die ('数据库操作失败');
    mysql_close($con);
 

$url="detail-edit.php?nid=".$trans_nid."&sys_part=".$system_part;
?>

<input type="hidden" id="img_php_trans_url" value="<?echo $url?>" />




<script type="text/javascript">
 
alert("图片已删除，请继续操作.");

var url=document.getElementById('img_php_trans_url').value;
document.location.href = url;
</script>

</body>